<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/warehouse/wareInoutOrderDetails/list?ioid=${requestScope.ioid}&str=${requestScope.str}" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" value="${requestScope.dwzPageBean.countResultMap.orderField}" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" value="${requestScope.dwzPageBean.countResultMap.orderDirection}" />
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td><p class="nowrap">
							<label style="width: 300px;">订单编号：${requestScope.details.onum}</label>
						</p></td>
					<td><p class="nowrap">
							<label style="width: 200px;">订单金额：<nf:nfmt num="${requestScope.details.opcs}"/></label>
						</p></td>
					<td><p class="nowrap">
							<label style="width: 200px;">订单类型：${requestScope.details.type == 1?'采购入库':''}${requestScope.details.type == 2?'其他入库':''}${requestScope.details.type == 3?'盈亏入库':''}</label>
						</p></td>
					<td><p class="nowrap">
							<label style="width: 250px;">订单时间：<fmt:formatDate value="${requestScope.details.odtm}"  pattern='yyyy-MM-dd HH:mm:ss'/></label>
						</p></td>
				</tr>
			</table>
			<div class="subBar">
				<ul>
					<li></li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<shiro:hasPermission name="/warehouse/wareInoutOrderDetails/export">
				<li><a href="${pageContext.request.contextPath}/warehouse/wareInoutOrderDetails/export?ioid=${requestScope.ioid}" target="dwzExport" targetType="navTab" title="是要导出这些记录吗?" class="icon"><span>导出EXCEL</span></a></li>
			</shiro:hasPermission>
			<c:if test="${requestScope.str == 'out'}">
				<shiro:hasPermission name="/warehouse/wareOutOrder/list">
					<li><a target="navTab" class="goBackBtn" title="出库单" href="${pageContext.request.contextPath}/warehouse/wareOutOrder/list" rel="${pageContext.request.contextPath}/warehouse/wareOutOrder/list"><span>返回</span></a></li>
				</shiro:hasPermission>
			</c:if>
			<c:if test="${requestScope.str == 'in'}">
				<shiro:hasPermission name="/warehouse/wareInOrder/list">
					<li><a target="navTab" class="goBackBtn" title="入库单" href="${pageContext.request.contextPath}/warehouse/wareInOrder/list" rel="${pageContext.request.contextPath}/warehouse/wareInOrder/list"><span>返回</span></a></li>
				</shiro:hasPermission>
			</c:if>
		</ul>
	</div>
	<table class="table" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="138">
		<thead>
			<tr>
				<th orderField="wname" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'wname'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>仓库名称</th>
				<th orderField="normname" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'normname'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>商品名称</th>
				<th orderField="odamut" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'odamut'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>数量</th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
				<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
					<tr>
						<td>${record.wname}</td>
						<td>${record.normname}</td>
						<td>${record.odamut}</td>
					</tr>
				</c:forEach>
			</c:if>
		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/pageBar.jsp"%>
</div>